package com.jming.yygh.cmn.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author jming
 * @date 2021-04-23
 */
@Repository
@FeignClient("service-cmn")
public interface DictFeignClient {

    /**
     * 根据dictCode和value查询
     *
     * @param dictCode dictCode
     * @param value    value
     * @return 查询结果
     */
    @GetMapping("/admin/cmn/dict/getName/{dictCode}/{value}")
    String getName(@PathVariable("dictCode") String dictCode,
                          @PathVariable("value") String value);


    /**
     * 根据value查询
     *
     * @param value value
     * @return 查询结果
     */
    @GetMapping("/admin/cmn/dict/getName/{value}")
    String getName(@PathVariable("value") String value);
}
